<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=
    , initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Star{
            constructor(uname,age){
                this.uname = uname;
                this.age = age;
            }
            sing(song){
                // console.log('111');
                console.log(this.uname+song);
            }
        }

    var ldh =new Star('张学友',18);
    var jj =new Star('贾俊',18);
        jj.sing('冰雨');
    console.log(ldh);
    console.log(jj);
    </script>
</body>
</html>